package com.liao.badminton.vo;

import com.liao.badminton.code.BaseField;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.List;
import lombok.Data;
import com.liao.badminton.entity.SystemUserRole;
/**
* @author liaocheng
* @date 2024-11-01
* description:用户和角色关联表
*/
@Data
public class SystemUserRoleVo  extends BaseField {

    @ApiModelProperty(value = "自增编号")
    private Long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "角色ID")
    private Long roleId;

    private List<Long> delIds;  //批量删除ids

    public static SystemUserRoleVo invertToVo(SystemUserRole systemUserRole){
        SystemUserRoleVo vo = new SystemUserRoleVo();
        BaseField.invert(systemUserRole, vo);
        vo.setId(systemUserRole.getId());
        vo.setUserId(systemUserRole.getUserId());
        vo.setRoleId(systemUserRole.getRoleId());
        return vo;
    }
}
